﻿using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Isuka.Excel.Events
{
    [ComImport]
    [ComVisible(true)]
    [Guid("00024411-0000-0000-C000-000000000046")]
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    [TypeLibType((short)0x1010)]
    public interface IDocEvents
    {
        [PreserveSig]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
        [DispId(0x607)]
        void SelectionChange([In, MarshalAs(UnmanagedType.Interface)] object target);

        [PreserveSig]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
        [DispId(0x601)]
        void BeforeDoubleClick([In, MarshalAs(UnmanagedType.Interface)] object target, [In] ref bool cancel);

        [PreserveSig]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
        [DispId(0x5fe)]
        void BeforeRightClick([In, MarshalAs(UnmanagedType.Interface)] object target, [In] ref bool cancel);

        [PreserveSig]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
        [DispId(0x130)]
        void Activate();

        [PreserveSig]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
        [DispId(0x5fa)]
        void Deactivate();

        [PreserveSig]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
        [DispId(0x117)]
        void Calculate();

        [PreserveSig]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
        [DispId(0x609)]
        void Change([In, MarshalAs(UnmanagedType.Interface)] object target);

        [PreserveSig]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
        [DispId(0x5be)]
        void FollowHyperlink([In, MarshalAs(UnmanagedType.Interface)] object target);

        [PreserveSig]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
        [DispId(0x86c)]
        void PivotTableUpdate([In, MarshalAs(UnmanagedType.Interface)] object target);
    }
}
